package org.loofer.ext.utils;

import java.util.regex.Pattern;

public final class HtmlUtils {
    public static String filterHtml(String inputString) {
        String textStr = "";
        try {
            return Pattern.compile("<[^>]+>", 2).matcher(Pattern.compile("<[/s]*?script[^>]*?>[/s/S]*?<[/s]*?//[/s]*?script[/s]*?>", 2).matcher(inputString).replaceAll("")).replaceAll("");
        } catch (Exception e) {
            System.err.println("Html2Text: " + e.getMessage());
            return textStr;
        }
    }
}
